#include <57header.h>

/* Usage: ./07_writeint filename */
int main(int argc, char *argv[]){
    ARGS_CHECK(argc, 2);
    int fd = open(argv[1], O_RDWR|O_TRUNC);
    ERROR_CHECK(fd, -1, "open");

    int num = 99999;
    int ret = write(fd, &num, sizeof(num));
    ERROR_CHECK(ret, -1, "write");
    close(fd);
    return 0;
}

